﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>宾果高校</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="generator" content="" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <link href="css/haiersoft.css" rel="stylesheet" type="text/css" media="screen,print" />
    <link href="css/print.css" rel="stylesheet" type="text/css" media="print" />
    <script src="js/side.js" type="text/javascript"></script>
    <link rel="stylesheet" href="/static/css/common/reset.css" />
    <link rel="stylesheet" href="/static/css/associate.css" />
    <link rel="stylesheet" href="/static/css/ng-pagination.min.css" />
    <link rel="stylesheet" href="/static/css/sweetalert.min.css" />
    <link rel="stylesheet" href="/static/css/jquery.datetimepicker.css" />
</head>

<body>
    <div class="wrap_left" id="frmTitle" name="fmTitle" style="display: none;">
        <div id="Logo"></div>

    </div>

    <div class="picBox" onclick="switchSysBar()" id="switchPoint"></div>

    <div class="wrap_right">
        <header>
            <!-- Header -->
            <div id="Header">
                <!-- Head -->
                <div id="Head">

                    <script language="javascript">
                        function showmenu(id) { id.style.visibility = "visible"; }
                        function hidmenu() { UserList.style.visibility = "hidden"; }
                        document.onclick = hidmenu;
                    </script>
                    <div class="user">
                        <a href="javascript:showmenu(UserList)">admin</a>
                        <div id="UserList">
                            <a href="">修改</a>
                            <a href="">注销</a>
                            <a href="">退出</a>
                        </div>
                    </div>
                </div>
                <!-- /Head -->
                <nav>
                    <ul id="Navi">
                        <li><a href="index.html"><img src="images/common/navi01.png" width="30" height="36" alt="主页"><span>主页</span></a></li>
                        <li><a href="enterprise-personal-audit.html"><img src="images/common/navi02.png" width="36" height="36" alt="企业-个人认证审核"><span>企业-个人认证审核</span></a></li>
                        <li><a href="enterprise-book-audit.html"><img src="images/common/navi03.png" width="26" height="36" alt="赞助书审核"><span>赞助书审核</span></a></li>
                        <li><a href="community-personal-audit.html"><img src="images/common/navi04.png" width="34" height="36" alt="社团-个人认证审核"><span>社团-个人认证审核</span></a></li>
                        <li><a href="community-book-audit.html"><img src="images/common/navi05.png" width="24" height="36" alt="活动书审核"><span>活动书审核</span></a></li>
                        <li><a href="agent-personal-audit.html"><img src="images/common/navi06.png" width="36" height="36" alt="项目管理"><span>学生信息审核</span></a></li>
                        <li class="active"><a href="eventlog.html"><img src="images/common/navi07.png" width="34" height="36" alt="系统日志"><span>系统日志</span></a></li>
                        <li><a href=""><img src="images/common/navi08.png" width="34" height="36" alt="项目备份"><span>项目备份</span></a></li>
                    </ul>
                </nav>
            </div>
            <!-- /Header -->
        </header>

        <!-- Contents -->
        <div id="Contents">
            <!-- TopMain -->
            <div id="TopMain">
                <!-- selectbox -->
                <div class="form-group clearfix fl mt4">
                    <label for="">日志类型：</label>
                    <select id="SelectEventLog" class="mt2">
                        <option value="0">请选择...</option>
                        <option value="1">系统错误</option>
                        <option value="2">数据生命周期</option>
                        <option value="3">发送成功短信</option>
                        <option value="4">发送失败短信</option>
                        <!--<option value="2">活动</option>-->
                    </select>
                </div>
                <div class="form-group clearfix fl" style="margin-left:10px">
                    <label for="">时间段：</label>
                    <input id="StartDate" type="text" style="width: 130px;"><span>—</span><input id="EndDate" type="text" style="width: 130px;">
                </div>
                <div class="form-group clearfix fl" style="margin-left:10px">
                    编号：<input id="EventID" type="text" style="width: 130px;">
                </div>
                <div class="form-group clearfix fl" style="margin-left:10px">
                    操作人：<input id="Operator" type="text" style="width: 130px;">
                </div>
                <div class="btn_box floatL" style="margin-left:10px"><input name="" type="button" value="查询" onclick="Go();" onmousemove="this.className='input_move'" onmouseout="this.className='input_out'"></div>
                <div class="btn_box floatL" style="margin-left:10px"><input name="" type="button" value="清空条件" onclick="Clear();" onmousemove="this.className='input_move'" onmouseout="this.className='input_out'"></div>
                <!-- /btn_box -->
            </div>
            <!-- /TopMain -->
            <!-- MainForm -->
            <div id="MainForm" ng-app="myApp">
                <div class="form_boxA" ng-controller="eventLogCtrl">
                    <h2>系统日志列表</h2>
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <th>编号</th>
                            <th>类型</th>
                            <th>操作对象</th>
                            <th>操作时间</th>
                            <th>操作人</th>
                            <th>具体信息</th>
                        </tr>
                        <tr ng-repeat="x in names">
                            <td>{{x.EventID}}</td>
                            <td>{{x.ActionType}}</td>
                            <td>{{x.ActionObject}}</td>
                            <td>{{x.ActionTime}}</td>
                            <td>{{x.Operator}}</td>
                            <td>{{x.Remark}}</td>
                        </tr>
                    </table>
                    <div class="page">
                        <div class="center">
                            <pager page-count="pageCount" current-page="currentPage" on-page-change="onPageChange()" first-text="首页" next-text="下一页" prev-text="上一页" last-text="尾页"></pager>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!-- /Contents -->
        <!-- /footer -->
        <footer>
            <address>电子邮箱：sales@haiersoft.com  Copyright &copy; 2015 1312 Corporation, All Rights.</address>
        </footer>
    </div>
</body>
</html>
<script type="text/javascript" src="/static/js/ref/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="/static/js/self/common.js"></script>
<script type="text/javascript" src="/static/js/ref/angular.min.js"></script>
<script type="text/javascript" src="/static/js/ref/ng-pagination.min.js"></script>
<script type="text/javascript" src="/static/js/ref/sweetalert.min.js"></script>
<script type="text/javascript" src="/static/js/ref/jquery.datetimepicker.full.min.js"></script>
<script>

    $(function () {
        $(".menu_list dd");
        $(".menu_list dt").click(function () {
            $(this).toggleClass("open").next().slideToggle("fast");
        });

        $.datetimepicker.setLocale('ch');//设置语言

        $('#StartDate').datetimepicker({
            timepicker: false,
            format: 'Y-m-d'
        });

        $('#EndDate').datetimepicker({
            timepicker: false,
            format: 'Y-m-d'
        });

    });

    var values = {};

    $("#divNavigation").load("/wuc/navigation.html");

    common.CreatePagingCtrl({ name: 'eventLogCtrl', pageChanged: ChangePage, objType: 'json' });

    function Go() {

        var val = $("#SelectEventLog").val();

        values.Limit = 10;
        values.Start = 1;
        values.StartDate = $('#StartDate').val();
        values.EndDate = $('#EndDate').val();
        values.Operator = $('#Operator').val();
        values.EventID = $('#EventID').val();
        values.EventType = "";
        values.EventObject = "";

        switch (val) {
            case "1":
                values.EventType = "SysError";
                break;
            case "2":
                values.EventObject = "LifecycleEvent";
                break;
            case "3":
                values.EventType = "SendMessage";
                break;
            case "4":
                values.EventType = "SendMsgError";
                break;
        }

        common.commonAjax({ type: 'Post', url: '/api/util/ListEventLog', data: values, sMethod: AfterCompleted });
    }

    function Clear()
    {
        $('#StartDate').val("");
        $('#EndDate').val("");
        $('#Operator').val("");
        $('#EventID').val("");
        $("#SelectEventLog").val("");
    }

    function AfterCompleted(ctx) {
        if (ctx == null) {
            common.alertMessage("无数据.");
            return;
        }

        var ele = document.querySelector("[ng-controller=eventLogCtrl]");

        angular.element(ele).scope().update(ctx);
    }

    function ChangePage($scope) {

        values.Start = $scope.currentPage;

        common.commonAjax({ type: 'Post', url: '/api/util/ListEventLog', data: values, sMethod: AfterCompleted });
    }

</script>